import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2022-08-06
 * Time: 16:33
 */
/* class Person{

    private String name = "Person";

    int age=0;

}
 class Child extends Person {

    public String grade;
}

public class Test_0806 {
    Person p = new Child();
    System.out.println(p.name);
}*/


//父类
class Base {
    public int x;
    public int y;
    class b{
        public b(){
            System.out.println("A内部类中B的构造器");
        }
    }
}

class Sub extends Base {
    public int z;

    public static int calculate(int x, int y, int z) {
        return x * y * z;
    }
}

public class Test_0806 {
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        System.out.println(Sub.calculate(a, b, c));
    }

    public static void main(String[] args) {
        new Son();
    }
}
//执行顺序：父类静态代码块 -> 子类静态代码块 -> 父类普通代码块、父类成员（按照声明优先顺序） -> 父类构造器
//-> 子类普通代码块、子类成员（按照声明优先顺序）-> 子类构造器

class Money {
    public Money() {
        System.out.println("我有很多钱");
    }
}

class Time {
    public Time() {
        System.out.println("我有很多时间");
    }
}

class Father {

    static {
        System.out.println("父类静态代码块"); // 1
    }

    {
        System.out.println("父类普通代码块"); // 5
    }

    Money money = new Money(); // 6

    public Father() {
        System.out.println("父类构造器");
    }

    {
        System.out.println("父类普通代码块2"); // 7
    }

    static {
        System.out.println("父类静态代码块2"); //2
    }
}

class Son extends Father {
    static {
        System.out.println("子类静态代码块"); // 3
    }

    {
        System.out.println("子类普通代码块");//8
    }

    Time time = new Time(); // 9

    public Son() {
        System.out.println("子类构造器");
    }//11

    static {
        System.out.println("子类静态代码块2"); //4
    }

    {
        System.out.println("子类普通代码块2"); //10
    }
}


